# -*- coding: utf-8 -*-
# @project: test06.py
# @file： Com_red_Excel.py
# @Time：2023/6/25 16:05
# @Author：liaogan
import os

from common.excel.excel_case import read_data
from common.log.log import log


class Red_Excel_data():
    filename_path = os.path.dirname(os.path.realpath(__file__))
    print(filename_path)
    file = filename_path + '/test_api_yunke_applets_basic_query.xlsx'
    cases = read_data(file, 'api')
    log.info(cases)
    data = []
    case_parametrize = []
    ids = []
    for case in cases:
        case_parametrize.append(case.get('method'))
        case_parametrize.append(case.get('path'))
        case_parametrize.append(case.get('data'))
        case_parametrize.append(case.get('check'))
        data.append(case_parametrize)
        case_parametrize = []
        ids.append(case.get('case_name'))
    log.info(data)
    log.info(ids)
